package yf.mall.dao;

import com.yf.dao.BaseDao;
import org.apache.ibatis.annotations.Param;
import yf.mall.entity.MallGoodsEntity;
import yf.mall.entity.MallTypeEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 分类Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Fri Nov 01 10:57:07 CST 2019
 */
@Mapper
public interface MallTypeDao extends BaseDao<MallTypeEntity> {

    /**

        List<MallTypeVo> queryListVo(MallTypeVo mallTypeVo);

        MallTypeVo getVo(Long id);

    **/

    List<MallTypeEntity> findByParentId(Long parentId);

    List<MallTypeEntity>  findAll();

    List<MallTypeEntity>  findByType(long type);

    List<Long>  findByGoodsId(Long goods_id);

    List<Long>  findByTypeId(Long type_id);

    void deleteByTypeIdBatch(Long[] id);

    List<MallGoodsEntity>  findByTypeIdAndShelf(@Param("type") Long type_id, @Param("shelf")Integer shelf);

    List<MallGoodsEntity>  findTypeByPid(@Param("pid") Long pid, @Param("shelf")Integer shelf);

    List<Long>  findByShopId(Long shop_id);

    void  saveGoodsIdAndTypeId(@Param("goods_id") Long goods_id,@Param("type_id") Long type_id);

    void  saveShopIdAndTypeId(@Param("shopId") Long shopId,@Param("typeId") Long typeId);

    void  delByGoodsId(Long goods_id);

    void  delByShopId(Long shop_id);

    void  delByGoodsIdBatch(Long[] goods_id);

    void  delByShopIdBatch(Long[] shop_id);

}
